import { createApp } from 'vue'
import { createPinia } from 'pinia'
import dayjs from 'dayjs'
import utc from 'dayjs/plugin/utc'
import timezone from 'dayjs/plugin/timezone'
import defaultImg from '@/directives/default-img-directive'
import clickOutside from '@/directives/clickOutside'
import initPostMessage from '@/utils/postMessage'
import App from './App.vue'
import router from './router'
import './assets/style/main.css'
/**
 * vant 组件配置按需加载 不要全局注册
 *
 *
 *
 *
 *
 *
 ***/
const app = createApp(App)
app.use(defaultImg)
initPostMessage()
clickOutside(app)

app.use(createPinia())
app.use(router)

/**
 * vant 组件配置按需加载 不要全局注册
 *
 *
 *
 *
 *
 *
 ***/
window.buildTime = __BUILD_TIME__

dayjs.extend(utc)
dayjs.extend(timezone)

dayjs.tz.setDefault('Asia/Shanghai')

app.mount('#app')
